import java.time.LocalDateTime;

public class Schedule {
    private static int count = 0;
    private int scheduleId;
    private Movie movie;
    private Hall hall;
    private LocalDateTime startTime;
    private double price;

    public Schedule(Movie movie, Hall hall, LocalDateTime startTime, double price) {
        this.scheduleId = ++count;
        this.movie = movie;
        this.hall = hall;
        this.startTime = startTime;
        this.price = price;
    }

    public int getScheduleId() { return scheduleId; }

    public Movie getMovie() { return movie; }

    public Hall getHall() { return hall; }

    public LocalDateTime getStartTime() { return startTime; }

    public double getPrice() { return price; }

    @Override
    public String toString() {
        return "场次ID：" + scheduleId + "  片名：" + movie.getTitle()
                + "  放映厅：" + hall.getName() + "  时间：" + startTime
                + "  票价：" + price;
    }
}